home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 1.7 KB | 64 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: RulerFacet.h
- // Release Version: $ 1.0d1 $
- //
- // Author: Anthone Burbidge
- // Creation Date: 3/28/94
- //
- // Copyright: © 1993, 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef _RULERFACET_
- #define _RULERFACET_
-
- #ifndef _TEXTPART_
- #include "TextPart.h"
- #endif
-
- // ----- Framework Includes -----
-
- #ifndef FWFACET_H
- #include "FWFacet.h"
- #endif
-
-
- //========================================================================================
- // CLASS CRulerFacet
- //========================================================================================
-
- class CRulerFacet : public FW_CFacet
- {
- private:
- static const RGBColor kGray;
- static const RGBColor kBlack;
-
- // ----- Construction/destruction
- public:
- CRulerFacet();
- void IRulerFacet(XMPFacet* facet, CTextPart* textPart);
- virtual ~CRulerFacet();
-
- // ----- Inherited API
- public:
- virtual void Draw(FW_CGraphicContext *gc);
- virtual FW_Boolean DoMouseDown(const FW_CPoint& where,
- XMPEventData event);
- virtual void MouseEnter(const FW_CPoint& where);
-
- // ----- New API
- protected:
- virtual void DrawBackground(FW_PlatformRegion invalidRgn, const FW_SPlatformRect& boundingBox);
- virtual void DrawTools(FW_PlatformRegion invalidRgn, const FW_SPlatformRect& boundingBox);
- virtual void DrawRuler(FW_PlatformRegion invalidRgn, const FW_SPlatformRect& boundingBox);
-
- // ----- Fields
- private:
- CTextPart* fTextPart;
- FW_SPlatformRect fToolAreas[CTextPart::kNumberOfTools];
- short fSelectedTool;
- };
-
- #endif
-